import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ProductStoreVO, ProductListQuery, ProductItemVO, ProductStoreCateVO } from './types';

/**
 *查询商品库列表
 */
export const getProductStoreList = (query: { accountId: number; advertiserId: number }): AxiosPromise<ProductStoreVO[]> => {
  return request({
    url: '/oce/third/getProductStoreList',
    method: 'get',
    params: query
  });
};

/**
 *查询商品库下面商品列表
 */
export const getProductList = (query: ProductListQuery): AxiosPromise<ProductItemVO[]> => {
  return request({
    url: '/oce/third/getDpaProductList',
    method: 'get',
    params: query
  });
};

/**
 *查询商品库分类
 */
export const getProductStoreCatetoryList = (query: { accountId: number; advertiserId: number }): AxiosPromise<ProductStoreCateVO[]> => {
  return request({
    url: '/oce/third/getProductStoreCatetoryList',
    method: 'get',
    params: query
  });
};
